package com.func.domain.strategy.service;

import com.func.domain.strategy.model.valobj.StrategyAwardStockKeyVO;

/**
 * @version 1.0
 * @className IRaffleStock
 * @description 从数据库更新库存相关的接口
 * @author: func
 * @date 2025/3/2 14:56
 */


public interface IRaffleStock {

    /**
     * 从数据库中将指定的奖品的库存数量 - 1
     * @param strategyId
     * @param awardId
     */
    void updateStrategyAwardStock(Long strategyId, Integer awardId);

    /**
     * 从延迟队列中获取到需要更新的奖品
     * @return 奖品库存Key信息
     * @throws InterruptedException 异常
     */
    StrategyAwardStockKeyVO takeQueueValue() throws InterruptedException;
}
